use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct LogConfig {
    pub max_size: u32,
    pub max_backups: u32,
    pub max_age: u32,
    pub compress: bool,
    pub oper_max_size: u32,
}

impl LogConfig {
    pub fn new() -> Self {
        Self::default()
    }
}

impl Default for LogConfig {
    fn default() -> Self {
        Self {
            max_size: 10,
            max_backups: 3,
            max_age: 28,
            compress: true,
            oper_max_size: 30,
        }
    }
}
